﻿<!-- BEGIN MAIN CONTENT -->
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN: ACCORDION DEMO -->
        <div class="portlet light">
            <div class="portlet-title page-bar">
                <ul class="page-breadcrumb pull-right">
                    <li>
                        <i class="fa fa-home"></i>
                        <a href="#/home.html">管理中心</a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="#/GgcmsMessagesList.html">消息管理</a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="javascript:;" data-ng-bind="$state.current.data.pageTitle"></a>
                    </li>
                </ul>
                <div class="caption font-green-sharp">
                    <i class="icon-list font-green-sharp"></i>
                    <span class="caption-subject bold uppercase" data-ng-bind="$state.current.data.pageTitle"></span>
                </div>
            </div>
            <div class="portlet-body">
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal" name="ggcmsForm" role="form" novalidate ng-if="!source">
                            <div class="form-body">
                                <div class="form-group" ng-class="{'has-error' : ggcmsForm.Message.$invalid&&!ggcmsForm.Message.$pristine}">
                                    <label class="col-md-3 control-label">消息:</label>
                                    <div class="col-md-9">
                                        <textarea name="Message" id="Message" maxlength="255" class="form-control" rows="3" required ng-model="data.Message" placeholder="消息内容"></textarea>
                                        <div class="help-block" ng-show="ggcmsForm.Message.$invalid&&!ggcmsForm.Message.$pristine"> 消息内容 </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">接收者:</label>
                                    <div class="col-md-4">
                                        <div class="input-group mg-b-5">
                                            <input type="text" ng-model="currentInfo.uname" class="form-control">
                                            <div class="input-group-btn">
                                                <button type="button" class="btn blue" ng-click="userFilter(currentInfo.uname)" tabindex="-1">查询</button>
                                                <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" tabindex="-1">
                                                    <i class="fa fa-angle-down"></i>
                                                </button>
                                                <ul class="dropdown-menu pull-right" role="menu">
                                                    <li>
                                                        <a href="javascript:;" ng-click="userFilter(currentInfo.uname,1)"> 查用户名 </a>
                                                    </li>
                                                    <li>
                                                        <a href="javascript:;" ng-click="userFilter(currentInfo.uname,2)"> 查姓名 </a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                        <div class="list-group">
                                            <button class="list-group-item" ng-class="{'disabled':isSelected(item)}" ng-disabled="isSelected(item)" ng-repeat="item in data.List" ng-click="userSelect(item)"> {{item.Userid}} ({{item.Realname}}) </button>
                                        </div>
                                    </div>
                                    <div class="col-md-5">
                                        <a href="javascript:;" ng-click="userRemove(item)" class="btn btn-default m-h-5" ng-repeat="item in data.touserlist">{{item.Userid}} ({{item.Realname}}) <i class="fa fa-times-circle-o font-red"></i> </a>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-9 col-md-offset-3" ng-include="sysConfigs.paginationTmpl"></div>
                                </div>
                            </div>
                            <div class="form-actions">
                                <hr/>
                                <div class="row">
                                    <div class="col-md-12 text-center">
                                        <input type="hidden" ng-model="currentInfo.tousers" required>
                                        <button class="btn green" ng-click="editSvr.update(data)" ng-disabled="ggcmsForm.$invalid||saveing"> <span class="fa fa-save"></span> 发送</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="form-horizontal" ng-if="source">
                            <div class="form-body">
                                <div class="form-group">
                                    <label class="col-md-3 control-label">发送者:</label>
                                    <div class="col-md-3">
                                        <div class="form-control" ng-bind="source.SenduserName"> </div>
                                    </div>
                                    <label class="col-md-3 control-label">接收者:</label>
                                    <div class="col-md-3">
                                        <div class="form-control" ng-bind="source.RecvuserName"> </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">消息:</label>
                                    <div class="col-md-9">
                                        <div class="form-control" ng-bind="source.Message"> </div>
                                        <span>时间:</span>
                                        <span ng-bind="source.Cdate |date:'yyyy-MM-dd HH:mm:ss'"> </span>
                                    </div>
                                </div>
                            </div>
                            <hr/>
                            <form name="ggcmsForm" role="form" novalidate>
                                <div class="form-body">
                                    <div class="form-group" ng-class="{'has-error' : ggcmsForm.Message.$invalid&&!ggcmsForm.Message.$pristine}">
                                        <label class="col-md-3 control-label">消息回复:</label>
                                        <div class="col-md-9">
                                            <textarea name="Message" id="Message" maxlength="255" class="form-control" rows="3" required ng-model="data.Message" placeholder="消息回复"></textarea>
                                            <div class="help-block" ng-show="ggcmsForm.Message.$invalid&&!ggcmsForm.Message.$pristine"> 消息回复 </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <hr/>
                                    <div class="row">
                                        <div class="col-md-12 text-center">
                                            <button class="btn green" ng-click="editSvr.update(data)" ng-disabled="ggcmsForm.$invalid||saveing"> <span class="fa fa-reply"></span> 回复</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- END: ACCORDION DEMO -->
    </div>
</div>
<!-- END MAIN CONTENT -->